functions in javascript are lexically rather than dynamically scoped . this means that they run in the scope in which they are defined, not the scope from which they are executed 函數是常量作用范圍,而不是動態作用范圍。這個意思就是說函數運行在它定義好的域中,而不是在執行執行它的域。
dynamically scoped meaning:[Computer] < language > In a dynamically scoped language, e.g. most versions of Lisp , an identifier can be referred to, not only in the block where it is declared, but also in any function...